{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport RightOutlined from \"@ant-design/icons/es/icons/RightOutlined\";\nimport classNames from 'classnames';\nimport RcCollapse from 'rc-collapse';\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport omit from \"rc-util/es/omit\";\nimport { ConfigContext } from '../config-provider';\nimport initCollapseMotion from '../_util/motion';\nimport { cloneElement } from '../_util/reactNode';\nimport warning from '../_util/warning';\nimport CollapsePanel from './CollapsePanel';\nimport useStyle from './style';\nvar Collapse = function Collapse(props) {\n  var _classNames;\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction;\n  var customizePrefixCls = props.prefixCls,\n    _props$className = props.className,\n    className = _props$className === void 0 ? '' : _props$className,\n    _props$bordered = props.bordered,\n    bordered = _props$bordered === void 0 ? true : _props$bordered,\n    ghost = props.ghost,\n    _props$expandIconPosi = props.expandIconPosition,\n    expandIconPosition = _props$expandIconPosi === void 0 ? 'start' : _props$expandIconPosi;\n  var prefixCls = getPrefixCls('collapse', customizePrefixCls);\n  var rootPrefixCls = getPrefixCls();\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  // Warning if use legacy type `expandIconPosition`\n  process.env.NODE_ENV !== \"production\" ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'Collapse', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : void 0;\n  // Align with logic position\n  var mergedExpandIconPosition = React.useMemo(function () {\n    if (expandIconPosition === 'left') {\n      return 'start';\n    }\n    return expandIconPosition === 'right' ? 'end' : expandIconPosition;\n  }, [expandIconPosition]);\n  var renderExpandIcon = function renderExpandIcon() {\n    var panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var expandIcon = props.expandIcon;\n    var icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/React.createElement(RightOutlined, {\n      rotate: panelProps.isActive ? 90 : undefined\n    });\n    return cloneElement(icon, function () {\n      return {\n        className: classNames(icon.props.className, \"\".concat(prefixCls, \"-arrow\"))\n      };\n    });\n  };\n  var collapseClassName = classNames(\"\".concat(prefixCls, \"-icon-position-\").concat(mergedExpandIconPosition), (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-borderless\"), !bordered), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ghost\"), !!ghost), _classNames), className, hashId);\n  var openMotion = Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false,\n    leavedClassName: \"\".concat(prefixCls, \"-content-hidden\")\n  });\n  var getItems = function getItems() {\n    var children = props.children;\n    return toArray(children).map(function (child, index) {\n      var _a;\n      if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {\n        var key = child.key || String(index);\n        var _child$props = child.props,\n          disabled = _child$props.disabled,\n          collapsible = _child$props.collapsible;\n        var childProps = Object.assign(Object.assign({}, omit(child.props, ['disabled'])), {\n          key: key,\n          collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined\n        });\n        return cloneElement(child, childProps);\n      }\n      return child;\n    });\n  };\n  return wrapSSR( /*#__PURE__*/React.createElement(RcCollapse, Object.assign({\n    openMotion: openMotion\n  }, props, {\n    expandIcon: renderExpandIcon,\n    prefixCls: prefixCls,\n    className: collapseClassName\n  }), getItems()));\n};\nCollapse.Panel = CollapsePanel;\nexport default Collapse;","map":{"version":3,"names":["RightOutlined","classNames","RcCollapse","React","toArray","omit","ConfigContext","initCollapseMotion","cloneElement","warning","CollapsePanel","useStyle","Collapse","props","useContext","getPrefixCls","direction","customizePrefixCls","prefixCls","className","bordered","ghost","expandIconPosition","rootPrefixCls","wrapSSR","hashId","process","env","NODE_ENV","mergedExpandIconPosition","useMemo","renderExpandIcon","panelProps","arguments","length","undefined","expandIcon","icon","createElement","rotate","isActive","collapseClassName","openMotion","Object","assign","motionAppear","leavedClassName","getItems","children","map","child","index","_a","disabled","key","String","collapsible","childProps","Panel"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/collapse/Collapse.js"],"sourcesContent":["import RightOutlined from \"@ant-design/icons/es/icons/RightOutlined\";\nimport classNames from 'classnames';\nimport RcCollapse from 'rc-collapse';\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport omit from \"rc-util/es/omit\";\nimport { ConfigContext } from '../config-provider';\nimport initCollapseMotion from '../_util/motion';\nimport { cloneElement } from '../_util/reactNode';\nimport warning from '../_util/warning';\nimport CollapsePanel from './CollapsePanel';\nimport useStyle from './style';\nconst Collapse = props => {\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className = '',\n    bordered = true,\n    ghost,\n    expandIconPosition = 'start'\n  } = props;\n  const prefixCls = getPrefixCls('collapse', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  // Warning if use legacy type `expandIconPosition`\n  process.env.NODE_ENV !== \"production\" ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'Collapse', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : void 0;\n  // Align with logic position\n  const mergedExpandIconPosition = React.useMemo(() => {\n    if (expandIconPosition === 'left') {\n      return 'start';\n    }\n    return expandIconPosition === 'right' ? 'end' : expandIconPosition;\n  }, [expandIconPosition]);\n  const renderExpandIcon = function () {\n    let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const {\n      expandIcon\n    } = props;\n    const icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/React.createElement(RightOutlined, {\n      rotate: panelProps.isActive ? 90 : undefined\n    });\n    return cloneElement(icon, () => ({\n      className: classNames(icon.props.className, `${prefixCls}-arrow`)\n    }));\n  };\n  const collapseClassName = classNames(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {\n    [`${prefixCls}-borderless`]: !bordered,\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-ghost`]: !!ghost\n  }, className, hashId);\n  const openMotion = Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false,\n    leavedClassName: `${prefixCls}-content-hidden`\n  });\n  const getItems = () => {\n    const {\n      children\n    } = props;\n    return toArray(children).map((child, index) => {\n      var _a;\n      if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {\n        const key = child.key || String(index);\n        const {\n          disabled,\n          collapsible\n        } = child.props;\n        const childProps = Object.assign(Object.assign({}, omit(child.props, ['disabled'])), {\n          key,\n          collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined\n        });\n        return cloneElement(child, childProps);\n      }\n      return child;\n    });\n  };\n  return wrapSSR( /*#__PURE__*/React.createElement(RcCollapse, Object.assign({\n    openMotion: openMotion\n  }, props, {\n    expandIcon: renderExpandIcon,\n    prefixCls: prefixCls,\n    className: collapseClassName\n  }), getItems()));\n};\nCollapse.Panel = CollapsePanel;\nexport default Collapse;"],"mappings":";;AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,UAAU,MAAM,aAAa;AACpC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,OAAO,MAAM,6BAA6B;AACjD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,kBAAkB,MAAM,iBAAiB;AAChD,SAASC,YAAY,QAAQ,oBAAoB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